from django.db import models


# Create your models here.
class DHT11(models.Model):
    tem = models.CharField(max_length=64, verbose_name='温度')
    hum = models.CharField(max_length=64, verbose_name='湿度')
    date = models.DateField(auto_now=True, verbose_name='时间')

    class Meta:
        db_table = 'dht11'
        verbose_name = '温湿度'

    def __str__(self):
        return self.tem


class HX711(models.Model):
    weight = models.CharField(max_length=64, verbose_name='重量')
    date = models.DateField(auto_now=True, verbose_name='时间')

    class Meta:
        db_table = 'hx711'
        verbose_name = '重量'

    def __str__(self):
        return self.weight
